package com.feng.controller;

import com.feng.domain.ResponseResult;
import com.feng.service.CategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/category")
@Api(tags = "文章分类")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("categoryList")
    public ResponseResult categoryList(){
        return categoryService.getCategory();
    }
}
